<?php

defined('_JEXEC') or die('Restricted Access');

JHtml::_('behavior.tooltip');
?>

<form action="<?php echo JRoute::_('index.php?option=com_link&view=links'); ?>" method="post" name="adminForm"  id="adminForm">
	<div id="filter-bar" class="btn-toolbar">
		<a  class="btn btn-small btn-success" href="index.php?option=com_link&view=detail">Import Article</a>
	</div>
	<table class="table table-striped" id="articleList">
    	<thead>
        	<tr>
				<th width="5">ID</th>
                <th width="20"><input type="checkbox" name="checkall-toggle" value="" onclick="Joomla.checkAll(this)" /></th>			
                <th>Title</th>
                <th>Link</th>
                 <th>Website</th>
                <th width="1%" style="min-width:55px" class="nowrap center"><?php echo JText::_('JSTATUS');?></th>
             </tr>
		</thead>
        <tfoot>
	        <tr>
				<td colspan="6"><?php echo $this->pagination->getListFooter(); ?></td>
			</tr>
        </tfoot>
        <tbody>
            <?php foreach($this->items as $i => $item): ?>
				<tr class="row<?php echo $i % 2; ?>">
					<td><?php echo $item->id; ?></td>
					<td><?php echo JHtml::_('grid.id', $i, $item->id); ?></td>
					<td><a href="index.php?option=com_link&view=link&layout=edit&id=<?php echo $item->id?>&task=link.edit"><?php echo $item->title; ?></a></td>
					<td><?php echo $item->link?></td>
					<td>
					<?php foreach ($_SESSION['ARRAY_LINK_WEB'] as $link){
						if ($link['id']==$item->category) {
							echo $link['text'];
						}
						
					}?>
					</td>
					<td class="center"><?php echo JHtml::_('jgrid.published', $item->published, $i, 'links.', 1, 'cb'); ?></td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
	<div>
        <input type="hidden" name="task" value="" />
        <input type="hidden" name="boxchecked" value="0" />
    	<?php echo JHtml::_('form.token'); ?>
	</div>

</form>

